package com.swipemaster.music;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import com.swipemaster.common.Global;

public class MusicService extends Service
{
	public MusicService()
	{
	}

	@Override
	public IBinder onBind(Intent intent)
	{
		return null;
	}

	@Override
	public void onDestroy()
	{
		Global.app.musicPlayer.stop();
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId)
	{
		if (intent != null)
		{
			Global.app.musicPlayer.play();
		}
		return START_STICKY;
	}
}